#pragma once
#include "Types.h"




namespace physx
{
	class PxMaterial;
}

namespace Boon
{
	namespace Physics
	{
		class NvidiaPhysX;
	}
	/*!
	* Physics-Material describing the which defines the friction and
	* restitution properties used to resolve a collision with the objects
	* Note: Use factory method IPhysics::CreateMaterial() to create instance
	*/
	class MaterialPhysics
	{
		MaterialPhysics( physx::PxMaterial* mat, float damping = .0f, float dampingAngular = .0f );
		MaterialPhysics( const MaterialPhysics& o );
		MaterialPhysics& operator=( const MaterialPhysics& rhs );

	public:
		void				SetDynamicFriction( float friction );
		float				GetDynamicFriction() const;
		void				SetStaticFriction( float friction );
		float				GetStaticFriction() const;
		void				SetRestitution( float restitution );
		float				GetRestitution() const;
		void				SetFrictionCombineMode( PhysicsCombineMode mode );
		PhysicsCombineMode	GetFrictionCombineMode() const;
		void				SetRestitutionCombineMode( PhysicsCombineMode mode );
		PhysicsCombineMode	GetRestitutionCombineMode() const;
		void				SetDamping( float damping );
		float				GetDamping() const;
		void				SetDampingAngular( float damping );
		float				GetDampingAngular() const;

	private:
		physx::PxMaterial*					m_Mat; 		/*!< PhysX-Ptr to material owned by physx world */
		float								m_Damping, m_DampingAngular;

		friend class Boon::Physics::NvidiaPhysX;
		friend class Boon::Collider;
	};


}
